import http from "../request"
import { Basic } from "../types"
import { SettlementCenter } from "../types/settlementCenter"
export function orderSettlement(goodsId: Array<number>, userId: number) {
	return http<SettlementCenter.orderInfoType[]>({
		url: `/ignore/user/cart/queryCartByIds?goodsId=${goodsId}&userId=${userId}`,
		method: 'GET'
	})
}

/**
 * @description 创建订单
 * @param {Array<number>} goodsId 
 * @param {number} userId 
 * @return 
*/
export function createOrder(data) {
	return http<SettlementCenter.orderInfoType[]>({
		url: `/ignore/user/order/createOrder`,
		method: 'POST',
		data
	})
}